package com.hk.commons.poi.excel.read.sax.v03.handler;

import com.hk.commons.poi.excel.read.sax.v03.XlsReadContext;
import org.apache.poi.hssf.record.NumberRecord;
import org.apache.poi.hssf.record.Record;

/**
 * 单元格为数字类型，也可能是日期
 *
 * @author Kevin
 */
public class NumberRecordHandler implements XlsRecordHandler {

    @Override
    public void processRecord(Record poiRecord, XlsReadContext readContext) {
        NumberRecord numberRecord = (NumberRecord) poiRecord;
        readContext.getColumnValueMap().put(numberRecord.getColumn(),
                readContext.getFormatListener().formatNumberDateCell(numberRecord));
    }
}
